using UnityEngine;

public class FoodObject : CellObject {
    private int m_foodAmount;
    
    [SerializeField] private Utility.GameEvents.Scriptable.Integrated.IntGameEvent m_onTakeFood;

    public void Init(bool passable,int foodAmount) {
        Passable = passable;
        m_foodAmount = foodAmount;
    }

    public override void PlayerEntered() {
        m_onTakeFood.Raise(m_foodAmount);
        Destroy(gameObject);
    }
}
